import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'login',
        component: () => import('../views/LoginView.vue')
    },
    {
        path: '/home',
        name: 'home',
        component: () => import('../views/HomeView.vue')
    },
    {
        path: '/system/role',
        name: 'role',
        component: () => import('../views/system/RoleView.vue')
    },
    {
        path: '/system/dept', name: 'dept', component: () => import('../views/system/DeptView.vue')
    },
    {
        path: '/system/user', name: 'user', component: () => import('../views/system/UserView.vue')
    },
    {
        path: '/menu',
        name: 'menu',
        component: () => import('../views/system/CarMenuView.vue')
    },
    {
        path: '/list',
        name: 'list',
        component: () => import('../views/system/ListView.vue')
    },
    {
        path: '/listType',
        name: 'listType',
        component: () => import('../views/system/ListTypeView.vue')
    },
    {
        path: '/data',
        name: 'data',
        component: () => import('../views/system/DataListView.vue')
    },
    {
        path: '/battery',
        name: 'battery',
        component: () => import('../views/service/BatteryView.vue')
    },
    {
        path: '/machine',
        name: 'machine',
        component: () => import('../views/service/MachineView.vue')
    },
    {
        path: '/types',
        name: 'types',
        component: () => import('../views/service/TypesView.vue')
    },
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
